<?php get_header(); ?>
   


            <div class="page-content port-thumbs">
						<div class="filter-bar clearfix">
<p><?php $current_category = single_cat_title(); ?></p>
							<ul class="filter-list filter clearfix"> 
								
                            </ul>
							<div class="portfolio-nav">
                                <div class="nav-right"></div>
                                <div class="nav-left"></div>
							</div>
						</div>

						<div id="container" class="clearfix project-listing">
							<div class="filter-posts" id="boxes">
                            
                          <?php $post_query = new WP_Query('showposts=12'); while ( have_posts() ) : the_post(); ?>

                                    <div data-id="" class="box project-list-img post project">
                                        <a class="project__link" href="<?php the_permalink(); ?>">
						<?php if(has_post_thumbnail()):?>
									<?php echo get_the_post_thumbnail($post->ID,'work_img',array('alt' => $post->post_title))?>
								<?php else :?>
									<?php if(get_post_meta(get_the_ID(),'thumbnail',true)):?>
										<img src="<?php echo get_post_meta(get_the_ID(),'attachment-portfolio-image wp-post-image',true)?>" >
									<?php endif;?>
								<?php endif;?>
                                            <div class="home-hover"><span><?php the_title(); ?></span>

<p></p></div>
                                        </a>
                                    </div>
                                    
                  <?php endwhile;?>
                            
                           
                         
							</div>
							<div class="clear"></div>
						</div>
                        
						<div class="clear"></div>
                        <a href="#" class="scrollup">返回顶部</a>
						
			</div>
            

<!-- 列表导航 -->
<center class="fetch" style="display:block;width:100px;height:25px;margin:auto;float: inherit;">
<?php pagination($query_string); ?>
</center>
<script type="text/javascript">
// Ajax-fetching "Load more posts"
$('.fetch a').live('click', function(e) {
	e.preventDefault();
	$(this).addClass('loading').text('正在加载...');
	$.ajax({
		type: "GET",
		url: $(this).attr('href') + '#boxes',
		dataType: "html",
		success: function(out) {
			result = $(out).find('#boxes .box');
			nextlink = $(out).find('.fetch a').attr('href');
			result.find('img').imagesLoaded(function() {
				$('#boxes').append(result).masonry('appended', result);
				$('.fetch a').removeClass('loading').text('加载更多文章');
				if (nextlink != undefined) {
					$('.fetch a').attr('href', nextlink);
				} else {
					$('.fetch').remove();
				}
			});
		}
	});
});
</script>





<?php get_footer(); ?>